

package es.realtimesystems.simplemulticast;
import java.net.*;

public class PruebaDatagramSocketEmisor //implements CanalCallback
{

  public PruebaDatagramSocketEmisor()
  {
  final String mn="PruebaDatagramSocketEmisor";

  try{
  Address dirMcast = new Address (InetAddress.getByName ("224.100.100.100"),2000);


  DatagramSocketPTMF socket = new DatagramSocketPTMF(dirMcast,(byte)8);

  Log.log (mn,"Tiempo INICIO: " + Temporizador.tiempoActualEnMseg());
  for (int i=1;i<=100;i++)
   {
    Buffer buf = new Buffer (("NO FIABLE "+i).getBytes());
    socket.send(buf);
   }
  Log.log (mn,"Tiempo FIN: " + Temporizador.tiempoActualEnMseg());

  while (true)
  {
     Temporizador.sleep (120000);
  }
  }catch (java.net.UnknownHostException e)
  {
    Log.log (mn,""+e);
   }
  catch (java.io.IOException e)
   {
    Log.log (mn,""+e);
   }
  }

  public static void main(String[] args)
  {
   new PruebaDatagramSocketEmisor();
  }



} 